<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Update Article</title>
</head>
<body>
<f:view>
	<table cellspacing="0" cellpadding="5" width="100%">
		<%--HEADER--%>
		<tr>
			<td colspan="3"><!-- Begin HEAD --> <%@include file="common/header.jsp"%> <!-- END HEAD --></td>
		</tr>

		<tr>
			<%--NAVIGATION--%>
			<td valign="top" width="20%"><!-- Begin MENU -->
			<div id="menu"><%@include file="common/menu.jsp"%></div>
			<!-- END MENU --></td>



			<td align="left" valign="top" width="60%"><%--CENTRAL BODY--%> <f:subview id="body">
				<h:form id="article">

					<table>
						<tr>
							<td><h:outputText value="Date" /></td>
							<td><h:outputText value="#{articleManagedBean.article.date}" /></td>
						</tr>
						<tr>
							<td><h:outputText value="Category" /></td>
							<td><h:selectOneMenu value="#{articleManagedBean.selectedCategory}">
								<f:selectItems value="#{categoryManagedBean.categoryList}" />
							</h:selectOneMenu></td>
						</tr>
						<tr>
							<td><h:outputText value="Autor" /></td>
							<td><h:inputText value="#{articleManagedBean.article.autor}" /></td>
						</tr>
						<tr>
							<td><h:outputText value="Title" /></td>
							<td><h:inputText value="#{articleManagedBean.article.title}" /></td>
						</tr>
						<tr>
							<td><h:outputText value="Content" /></td>
							<td><h:inputTextarea value="#{articleManagedBean.article.content}" /></td>
						</tr>
						
						<tr>
							<td><h:commandButton value="add" action="#{articleManagedBean.addArticle}" /></td>
						</tr>
					</table>


				</h:form>
			</f:subview></td>




		</tr>
		<%--FOOTER--%>
		<tr>
			<td colspan="3"><%@include file="common/footer.jsp"%></td>
		</tr>
	</table>
</f:view>
</body>
</html>